home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Libraries / MIDI Manager Class Library / CMIDIPort.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-03  |  1.5 KB  |  46 lines  |  [TEXT/KAHL]

  1. /*
  2.  *--- CMIDIPort.h -----------------------------------------------------------
  3.  * Copyright © Paul Ferguson, 1990, 1991, 1992.  All rights reserved.
  4.  *
  5.  *    For use with THINK C 5.0 and the THINK Class Library.
  6.  *
  7.  * Description:
  8.  *    An abstract class for all MIDI Manager port classes.
  9.  *
  10.  *    Refer to the CMIDI Programmer's Manual for a complete desciption of
  11.  *    this class.
  12.  *----------------------------------------------------------------------------
  13.  */
  14.  
  15. #pragma once
  16. #include "CMIDIClient.h"
  17.  
  18. class CMIDIPort : public CObject        // An abstract port, with methods and instance
  19. {                                        // variables common to all port objects.
  20. protected:                                // only called by subclass initializers
  21.  
  22.     OSErr            IMIDIPort(MIDIPortParams * portParams, short bufSize);
  23.  
  24. public:
  25.  
  26.     virtual    void    Dispose(void);
  27.     MIDIPortInfoHdl    GetPortInfo(void);
  28.     short            GetRefNum(void);
  29.     long            GetRefCon(void);
  30.     void            SetRefCon(long theRefCon);
  31.     void            GetPortName(StringPtr theName);
  32.     void            SetPortName(StringPtr theName);
  33.     virtual    OSErr    LoadPatches(ResType theResType, short theResID);
  34.     virtual    OSErr    SavePatches(ResType theResType, short theResID);
  35.     void            SetConnectionProc(ProcPtr theConnectProc, long theRefCon);
  36.     void            GetConnectionProc(ProcPtr *    theConnectProc, long * theRefCon);
  37.  
  38. protected:
  39.  
  40.     short            itsRefNum;            // From AddPort()
  41.     OSType            itsPortID;            // Identifier in MIDI Manager
  42.     OSErr            itsResult;            // Used by SavePatches()
  43.     unsigned short    itsVersion;            // Save upper word of client version
  44. };
  45.  
  46. // end of CMIDIPort.h